#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main() {
	int arr1[] = { 8,3,2,9,7,1,5,4 };
	int len = sizeof(arr1) / sizeof(arr1[0]);
	int i = 0;
	int count = 0;
	for (i = 0; i < len-1; i++) {
		int j = 0;
		for (j = i + 1; j < len; j++) {
			if (arr1[i] > arr1[j]) {
				printf("%d  >  %d\n", arr1[i], arr1[j]);
				count++;
			}
		}
	}
	printf("%d", count);


	return 0;
}